﻿using Caliburn.Micro;
using StructureMap.Configuration.DSL;

namespace Yapdb.WinGui.Infrastructure
{
    public class CaliburnRegistry : Registry
    {
        public CaliburnRegistry()
        {
            Scan(x =>
                     {
                         x.AssemblyContainingType<CaliburnRegistry>();
                         x.WithDefaultConventions();
                         x.RegisterConcreteTypesAgainstTheFirstInterface();
                         x.LookForRegistries();
                     });

            For<IWindowManager>().Add<WindowManager>();
            For<IEventAggregator>().Add<EventAggregator>();
        }
    }
}
